package com.itheima.tanhua.pojo.mongo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@Document("comment")
@AllArgsConstructor
@NoArgsConstructor
public class Comment implements Serializable {

    private ObjectId id;
    private ObjectId publishId;    //动态的id
    private Integer commentType;   //操作的类型  1是点赞 2.评论 3.是喜欢
    private String content;         //评论的文本  只有type为2 时才有值
    private Long userId;           //评论人
    private Long publishUserId;    //被评论人ID
    private Long created;           //发表时间
    private Integer likeCount=0;    //点赞总数
}
